//
//  YORequest.h
//  Youhuiju
//
//  Created by yutenys on 16/7/13.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,HttpMode) {
    HttpModeGet = 0,
    HttpModePost,
    HttpModePut,
    HttpModeDelete
};

@interface YORequest : NSObject
/*
 apiName:接口
 apiVersion：一半为nil  
 parameters：接口参数
 cachIdentifier：identifier
 */
- (NSURLRequest *)getWithAPIName:(NSString *)apiName apiVersion:(NSString *)apiVersion parameters:(NSDictionary *)parameters cachIdentifier:(NSString *)cachIdentifier;

- (NSURLRequest *)postWithAPIName:(NSString *)apiName apiVersion:(NSString *)apiVersion parameters:(NSDictionary *)parameters cachIdentifier:(NSString *)cachIdentifier jsonPara:(BOOL)json;

- (NSURLRequest *)putWithAPIName:(NSString *)apiName apiVersion:(NSString *)apiVersion parameters:(NSDictionary *)parameters cachIdentifier:(NSString *)cachIdentifier;

- (NSURLRequest *)deleteWithAPIName:(NSString *)apiName apiVersion:(NSString *)apiVersion parameters:(NSDictionary *)parameters cachIdentifier:(NSString *)cachIdentifier;
@end
